package com.kexun.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class GenerateOrder {

    private static int i = 1;

    public static String generate(String source) {
        String datetime = new SimpleDateFormat("yyMMdd").format(new Date());
        String random = (int) ((Math.random() * 9 + 1) * 100000) + "";
        i++;
        return source + datetime + random + i;
    }

    public static void main(String[] args) {
        String generate = generate("");
        System.out.println(generate);
    }
}
